#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
void sort1(char* left, char* right)
{
	char tmp = 0;
	while (left < right)
	{
		tmp = *left;
		*left = *right;
		*right = tmp;
		left++;
		right--;
	}
}
void sort2(char* string)
{
	
	do {
		char* tmp = string;
		int len = 0;
		while (*string&&*string!=' ')
		{
			len++;
			string++;
		}
		sort1(tmp, tmp + len - 1);
		string++;
	} while (*string);
}
int main()
{
	char arr[100] = { 0 };
	gets(arr);
	int length = strlen(arr);
	sort1(arr,arr+length-1);
	sort2(arr);
	printf("%s",arr);
	return 0;
}